-
Notifications
You must be signed in to change notification settings - Fork 30
Adding support for default environment variable to SFEOS for the number of returned items and STAC collections #419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add tests to verify the STAC_ITEM_LIMIT environment variable correctly limits returned items in all the following endpoints: - Collections list (`/collections`) - Search results (`/search`) - Collection items (`/collections/{id}/items`) Ensures the pagination and result limiting behaves as expected in the API.
This commit introduces the STAC_ITEM_LIMIT environment variable to control the maximum number of items returned by key API endpoints: - GET /collections - Limits collections returned - GET /collections/{collection_id}/items - Limits items in a collection - GET /search - Limits search results
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super cool
CHANGELOG.md
Outdated
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. | |||
|
|||
### Added | |||
|
|||
- Added default environment variable `STAC_ITEM_LIMIT` to SFEOS for result limiting of returned items and STAC collections |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi. This will need to be moved to the Unreleased section. It can be included in the next release. Also, can you add a link to the pull request number.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jonhealy1 I have moved the changelog
comment from Added
to Unreleased
and added a reference to the pull request number.
Looks great |
2cf463c
to
4a0a813
Compare
4a011f6
to
3f5c978
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@YuriZmytrakov Thank you
Thank you for merging @jonhealy1 ! |
Description:
At the moment, the default number of returned items and STAC collections is hardcoded as
10
and can not be changed, except by addinglimit
query parameter to the URL. This update introduces theSTAC_ITEM_LIMIT
environment variable, allowing us to customize the default limit for returned items and STAC collections.PR Checklist:
pre-commit run --all-files
)make test
)